import { createApp } from 'vue'
import { createPinia } from 'pinia'
import { lazyLoad } from './utils/lazyLoad'

import App from './App.vue'
import router from './router'

// ElementPlus国际化处理
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
// 引入ElementPlus的css
import 'element-plus/theme-chalk/el-message.css'
// 引入全局样式
import '@/asset/reset.css'

const app = createApp(App)

app.directive('lazy', lazyLoad)
app.use(ElementPlus, {
  locale: zhCn,
})
app.use(createPinia())
app.use(router)

app.mount('#app')
